<template>
  <div class="app-container home">

    <!-- 辅导员请假待审核 -->
    <div v-hasPermi="['leave:apply:countFdyUnAudit']"
      style="width: 400px;height: 300px;border: 1px solid lightblue;border-radius: 20px;">
      <div style="font-weight: bolder;font-size: 32px;margin: 10px;">
        请假待审核人数:
      </div>
      <div style="text-align: center;font-size: 128px;">
        {{ fdyUnAudit }}
      </div>
      <div style="text-align: center;">
        <el-button type="text" @click="toLeaveFdyAudit">点我前往审核</el-button>
      </div>
    </div>
  </div>
</template>

<script>
import { countFdyUnAudit } from "@/api/leave/leaveApply";

import { checkPermi } from "@/utils/permission";
import { fullLoading, isEmpty } from "@/api/helpFunc/index";

export default {
  name: "Index",
  data() {
    return {
      // 版本号
      version: "3.8.8",

      fdyUnAudit: 0
    };
  },
  created() {
    this.init();
  },
  methods: {
    goTarget(href) {
      window.open(href, "_blank");
    },
    async init() {
      if (checkPermi(['leave:apply:countFdyUnAudit'])) {
        let loading = fullLoading(this);
        let res = await countFdyUnAudit();
        loading.close();
        if (res.code == 200) {
          this.fdyUnAudit = res.data;
        }
      }
    },
    toLeaveFdyAudit(){
      this.$router.push("/leave/fdy");
    }
  }
};
</script>

<style scoped lang="scss">
.home {
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }

  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }

  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: "open sans",
  "Helvetica Neue",
  Helvetica,
  Arial,
  sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
}
</style>
